namespace devtm.Emit
{
    using System;
    

    [Serializable]
    public class EmitParameterDeclarationExpression : EmitExpression
    {
        private AttributeDeclarationCollection customAttributes;
        private FieldDirection dir;
        private string name;
        private EmitTypeReference type;

        public EmitParameterDeclarationExpression()
        {
        }

        public EmitParameterDeclarationExpression(EmitTypeReference type, string name)
        {
            this.Type = type;
            this.Name = name;
        }


        public EmitParameterDeclarationExpression(System.Type type, string name)
        {
            this.Type = new EmitTypeReference(type);
            this.Name = name;
        }

        public AttributeDeclarationCollection CustomAttributes
        {
            get
            {
                if (this.customAttributes == null)
                {
                    this.customAttributes = new AttributeDeclarationCollection();
                }
                return this.customAttributes;
            }
            set
            {
                this.customAttributes = value;
            }
        }

        public FieldDirection Direction
        {
            get
            {
                return this.dir;
            }
            set
            {
                this.dir = value;
            }
        }

        public string Name
        {
            get
            {
                if (this.name != null)
                {
                    return this.name;
                }
                return string.Empty;
            }
            set
            {
                this.name = value;
            }
        }

        public EmitTypeReference Type
        {
            get
            {
                if (this.type == null)
                {
                    this.type = new EmitTypeReference();
                }
                return this.type;
            }
            set
            {
                this.type = value;
            }
        }

        public override object Visit(Object parent, object builder)
        {
            throw new NotImplementedException();
        }



        public override EmitTypeReference ResolveType()
        {
            throw new NotImplementedException();
        }
    }
}
